<%@ page import="projectmanager.Task" %>



<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'description', 'error')} required">
	<label for="description">
		<g:message code="task.description.label" default="Description" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="description" required="" value="${taskInstance?.description}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'project', 'error')} required">
	<label for="project">
		<g:message code="task.project.label" default="Project" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="project" name="project.id" from="${projectmanager.Project.list()}" optionKey="id" required="" value="${taskInstance?.project?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'user', 'error')} required">
	<label for="user">
		<g:message code="task.user.label" default="User" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="user" name="user.id" from="${projectmanager.User.list()}" optionKey="id" required="" value="${taskInstance?.user?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'phase', 'error')} required">
	<label for="phase">
		<g:message code="task.phase.label" default="Phase" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="phase" from="${taskInstance.constraints.phase.inList}" required="" value="${taskInstance?.phase}" valueMessagePrefix="task.phase"/>
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'requirement', 'error')} required">
	<label for="requirement">
		<g:message code="task.requirement.label" default="Requirement" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="requirement" name="requirement.id" from="${projectmanager.Requirement.list()}" optionKey="id" required="" value="${taskInstance?.requirement?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'date', 'error')} required">
	<label for="date">
		<g:message code="task.date.label" default="Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="date" precision="day"  value="${taskInstance?.date}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'hours', 'error')} required">
	<label for="hours">
		<g:message code="task.hours.label" default="Hours" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="hours" step="any" required="" value="${taskInstance.hours}"/>
</div>

